// template string
let name = 'imooc';
console.log(`这是${name}教程`);
console.log(`1+2=${1 + 2}`);

// tag template
function isAdult(strArray, age) {
	let prefix = strArray[0];
	let str = '';
	if (age >= 18) {
		str = '成年了';
	} else {
		str = '未成年';
	}
	return `${prefix}${age}岁${str}`;
}
let age = 7;
let result = isAdult`imooc今年${age}`;
console.log(result);
